package homework_03;

import java.util.Scanner;

public class Work11 {
    //有一个不多于5位的正整数，求它是几位数，分别打印出每一位数字
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int target = sc.nextInt();
        if( target / 100000 > 0 || target <= 0){
            System.out.println("不合法");
        }else if( target / 10000 > 0){
            System.out.println("五位数");
            int w = target / 10000;
            int q = target / 1000 %10;
            int b = target / 100 % 10;
            int s = target / 10 % 10;
            int g = target % 10;
            System.out.println(w+":"+q+":"+b+":"+s+":"+g);
        }else if( target / 1000 > 0){
            System.out.println("四位数");
            int q = target / 1000 % 10;
            int b = target / 100 % 10;
            int s = target / 10 % 10;
            int g = target % 10;
            System.out.println(q+":"+b+":"+s+":"+g);
        }else if( target /100 > 0){
            int b = target / 100 % 10;
            int s = target / 10 % 10;
            int g = target % 10;
            System.out.println("三位数");
            System.out.println(b+":"+s+":"+g);
        }else if( target / 10 > 0){
            int s = target / 10 % 10;
            int g = target % 10;
            System.out.println("二位数");
            System.out.println(s+":"+g);
        }else{
            int g = target % 10;
            System.out.println("个位数");
            System.out.println(g);
        }
    }
}
